<?php if ($data['type'] == 'E') : ?>
<div class="event-item clearfix" id="event-<?php echo $data['id']; ?>">
	<div class="event-left">
    	<div class="event-left-header clearfix">
        	<span class="event-left-date"><?php echo ucwords(strftime('%A', strtotime($data['brief']))); ?></span>
            <span class="event-left-day pull-right"><?php echo date('d-m-Y', strtotime($data['brief'])); ?></span>
        </div>
        <div class="event-left-body">
        	<a href="<?php echo Yii::app()->createUrl('/Events/default/view', array('category'=>$data['title'], 'url'=>$data['slug'])); ?>" class="clearfix" title="<?php echo $data['title']; ?>">
            	<img src="<?php echo IMAGES_URL . 'events/thumbs/' . $data['image']; ?>" alt="<?php echo $data['title']; ?>" width="150" />
            </a>
        </div>
    </div>
    <div class="event-right">
    	<h3 class="event-title"><?php echo CHtml::link($data['title'], array('/Events/default/view', 'category'=>$data['title'], 'url'=>$data['slug']), array('title'=>$data['title'])); ?></h3>
       
    </div>
</div>
<?php else: ?>
<div class="media">
	<a class="pull-left thumbnail" href="<?php echo Yii::app()->createUrl('/Home/news/view', array('slug'=>$data['slug'])); ?>">
    	<img class="media-object" src="<?php echo IMAGES_URL . 'news/' . date('Ymd', strtotime($data['posteddate'])) . '/' . $data['image']; ?>" alt="<?php echo $data['title']; ?>" width="160">
    </a>
    <div class="media-body">
        <h4 class="media-heading"><?php echo CHtml::link($data['title'], array('/Home/news/view', 'slug'=>$data['slug'])); ?> <small>(<?php echo date('d-m-Y', strtotime($data['posteddate'])); ?>)</small></h4>
        <p><?php echo $data['title']; ?></p>
    </div>
</div>
<?php endif; ?>